<div class="col-sm-12 mt20">
    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-xs-12">
                <div class="col-xs-2">
                    <input class="form-control" ng-model="paramsMap.subsidy_id" placeholder="活动ID" />
                </div>
                <div class="col-xs-2">
                    <input class="form-control" ng-model="paramsMap.subsidy_name" placeholder="活动名称" />
                </div>
                <div class="col-xs-2">
                    <input class="form-control" ng-model="paramsMap.cardno" placeholder="用户身份证" />
                </div>
                <div class="col-xs-2">
                    <input class="form-control" ng-model="paramsMap.name" placeholder="用户姓名" />
                </div>
                <div class="col-xs-2"></div>
                <div class="col-xs-2">
                    <a class="btn btn-block btn-info" ng-click="load()">搜索</a>
                </div>
            </div>
            <div class="col-xs-12 mt20">
                <div class="col-xs-2">
                    <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="start_date.value" is-open="start_date.opened"
                        ng-click="dateOpen($event, start_date)" placeholder="开始时间" ng-required="true" close-text="关闭" current-text="今天"
                        clear-text="清除" readonly/>
                </div>
                <div class="col-xs-2">
                    <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="end_date.value" is-open="end_date.opened"
                        ng-click="dateOpen1($event, end_date)" placeholder="结束时间" ng-required="true" close-text="关闭" current-text="今天"
                        clear-text="清除" readonly/>
                </div>
                <div class="col-xs-2"></div>
                <div class="col-xs-2"></div>
                <div class="col-xs-2"></div>
                <div class="col-xs-2">
                    <a class="btn btn-success btn-block" ng-click="export('#Excel_table')">导出Excel</a>
                    <a id="dlink" download="用户.xls" ng-show="false"></a>
                </div>
            </div>
        </div>
    </div>
    <div class="panel panel-default">
        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-xs-2 text-center">活动ID/名称</th>
                        <th class="col-xs-1 text-center">外部系统领取id</th>
                        <th class="col-xs-2 text-center">外部系统订单名称或产品名称</th>
                        <th class="col-xs-2 text-center">姓名/身份证号/电话</th>
                        <th class="col-xs-2 text-center">身份证地址</th>
                        <th class="col-xs-1 text-center" style="padding-left: 0px; padding-right: 0px;">机构代码/
                            <br/>领取数量</th>
                        <th class="text-center" style="width: 83px; padding-left: 0px; padding-right: 0px;">状态</th>
                        <!-- <th class="text-center">领取数量</th> -->
                        <th class="col-xs-1 text-center">时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="user in userList">
                        <td class="text-center">
                            {{user.subsidy_id}}
                            <br />{{user.subsidy_name}}
                        </td>
                        <td class="text-center">
                            <div style="word-wrap : break-word;">
                                {{user.out_id}}
                            </div>
                        </td>
                        <td class="text-center">
                            {{user.out_name}}
                        </td>
                        <td class="text-center">
                            {{user.name}}
                            <br />{{user.cardno}}
                            <br />{{user.mobile}}
                        </td>
                        <td class="text-center">
                            {{user.cardaddres}}
                        </td>
                        <td class="text-center">
                            {{user.company_code}}
                            <br />{{user.subsidy_num}}
                        </td>
                        <td class="text-center">
                            <div ng-if="user.state == '1'" class="text-center">生效</div>
                            <div ng-if="user.state == '2'">失效</div>
                            <a class="btn btn-xs btn-danger" ng-if="user.state == '1'" ng-click="updateUserState(user)" has-permission='activity_manager' >失效</a>
                        </td>
                        <!-- <td class="text-center">
                            {{user.subsidy_num}}
                        </td> -->
                        <td class="text-center">
                            {{user.create_time}}
                        </td>
                    </tr>
                </tbody>
            </table>

            <table id="Excel_table" class="table table-bordered" ng-show="false" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-xs-1 text-center">活动ID</th>
                        <th class="col-xs-1 text-center">名称</th>
                        <th class="col-xs-1 text-center">外部系统领取id</th>
                        <th class="col-xs-2 text-center">外部系统订单名称或产品名称</th>
                        <th class="col-xs-2 text-center">姓名</th>
                        <th class="col-xs-2 text-center">电话</th>
                        <th class="col-xs-2 text-center">身份证号</th>
                        <th class="col-xs-2 text-center">身份证地址</th>
                        <th class="col-xs-1 text-center">机构代码</th>
                        <th class="col-xs-1 text-center">状态</th>
                        <th class="col-xs-1 text-center">领取数量</th>
                        <th class="col-xs-1 text-center">时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="user in userAllList">
                        <td class="text-center">
                            {{user.subsidy_id}}
                        </td>
                        <td class="text-center">
                            {{user.subsidy_name}}
                        </td>
                        <td class="text-center">
                            {{user.out_id}}
                        </td>
                        <td class="text-center">
                            {{user.out_name}}
                        </td>
                        <td class="text-center">
                            {{user.name}}
                        </td>
                        <td class="text-center">
                            {{user.mobile}}
                        </td>
                        <td class="text-center">
                            {{user.cardno}}
                        </td>
                        <td class="text-center">
                            {{user.cardaddres}}
                        </td>
                        <td class="text-center">
                            {{user.company_code}}
                        </td>
                        <td class="text-center">
                            <span ng-if="user.state == '1'">生效</span>
                            <span ng-if="user.state == '2'">失效</span>
                        </td>
                        <td class="text-center">
                            {{user.subsidy_num}}
                        </td>
                        <td class="text-center">
                            {{user.create_time}}
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="text-center clearfix" style="background-color: white; margin-right: 30px">
            <div class="col-xs-12 text-right">
                <pagination total-items="totalItems" ng-model="currentPage" ng-change="load()" previous-text="上一页" next-text="下一页" first-text="首页"
                    last-text="尾页" max-size="5" boundary-links="true" rotate="false" items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
            </div>
        </div>
    </div>

</div>